package com.ec.vs.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ec.vs.encrypt.EncryptTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName(value = "vs_appointment", autoResultMap = true)
public class VsAppointment {
    private Long id;
    private Long userId;             // 用户ID
    private String name;                //预约人
    @TableField(typeHandler = EncryptTypeHandler.class)
    private String mobile;              //预约人手机号
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;         //预约时间
    private Integer numberOfPeople;     //预约人数
    private Integer status;             //预约状态,0-待确定，1-待完成，2-取消，3-过期，4-完成
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;   //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;   //更新时间
    private Integer type;              //预约类型，0-探访，1-参观
    private Long elderId;            // 老人ID（可选字段）
    private String elderName;   // 对应数据库列 elder_name
}